package com.ruoyi.driver.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.FaceRecognitionResultMapper;
import com.ruoyi.driver.domain.FaceRecognitionResult;
import com.ruoyi.driver.service.IFaceRecognitionResultService;

/**
 * 人脸识别结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
public class FaceRecognitionResultServiceImpl implements IFaceRecognitionResultService 
{
    @Autowired
    private FaceRecognitionResultMapper faceRecognitionResultMapper;

    /**
     * 查询人脸识别结果
     * 
     * @param id 人脸识别结果主键
     * @return 人脸识别结果
     */
    @Override
    public FaceRecognitionResult selectFaceRecognitionResultById(Long id)
    {
        return faceRecognitionResultMapper.selectFaceRecognitionResultById(id);
    }

    /**
     * 查询人脸识别结果列表
     * 
     * @param faceRecognitionResult 人脸识别结果
     * @return 人脸识别结果集合
     */
    @Override
    public List<FaceRecognitionResult> selectFaceRecognitionResultList(FaceRecognitionResult faceRecognitionResult)
    {
        return faceRecognitionResultMapper.selectFaceRecognitionResultList(faceRecognitionResult);
    }

    /**
     * 新增人脸识别结果
     * 
     * @param faceRecognitionResult 人脸识别结果
     * @return 结果
     */
    @Override
    public int insertFaceRecognitionResult(FaceRecognitionResult faceRecognitionResult)
    {
        faceRecognitionResult.setCreateTime(DateUtils.getNowDate());
        return faceRecognitionResultMapper.insertFaceRecognitionResult(faceRecognitionResult);
    }

    /**
     * 修改人脸识别结果
     * 
     * @param faceRecognitionResult 人脸识别结果
     * @return 结果
     */
    @Override
    public int updateFaceRecognitionResult(FaceRecognitionResult faceRecognitionResult)
    {
        faceRecognitionResult.setUpdateTime(DateUtils.getNowDate());
        return faceRecognitionResultMapper.updateFaceRecognitionResult(faceRecognitionResult);
    }

    /**
     * 批量删除人脸识别结果
     * 
     * @param ids 需要删除的人脸识别结果主键集合
     * @return 结果
     */
    @Override
    public int deleteFaceRecognitionResultByIds(Long[] ids)
    {
        return faceRecognitionResultMapper.deleteFaceRecognitionResultByIds(ids);
    }

    /**
     * 删除人脸识别结果信息
     * 
     * @param id 人脸识别结果主键
     * @return 结果
     */
    @Override
    public int deleteFaceRecognitionResultById(Long id)
    {
        return faceRecognitionResultMapper.deleteFaceRecognitionResultById(id);
    }
}